 %{
    _ALL_USERS = models.security.utils.SecurityConstant.DIC_ALL_USER_LIST_NAME;
}%
 #{extends 'main.html'/}
         <div class="row wrapper  white-bg page-heading">
      <!--   <div class="wrapper wrapper-content animated fadeInRight"> -->
            <div class="row">
                <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>角色信息</h5>
                        <div class="ibox-tools btn-group">
                          #{f.button '查询',href:'javascript:query();',class:'btn btn-primary' /}
                          #{f.button '新增',href:@security.Roles.add(),class:'btn  btn-info',actionCode:'990008002' /}
                           
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row search-box">
                              #{form @security.Roles.index(),method:'GET',id:'queryForm', class:'form-horizontal'}
                              <div class="form-group form-inline col-md-4">
                                #{q.text_field 'query.name',label:'名称'/}
                              </div>
                       
                              #{/form}
                        </div>

                    <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover dataTables-example" >
                    <thead>
                    <tr>
                        <th>名称</th>
                        <th>操作人</th>
                        <th>操作时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    #{list items:rs?.results,as:'vo'}
                        <tr>
                            <td>${vo?.name}</td>
                            <td>#{f.dicValue _ALL_USERS,key:vo?.operatorId/}</td>
                            <td>${vo?.updatedAt?.format('yyyy-MM-dd HH:mm:ss')}</td>
                            <td>
                            #{f.link_to '查看','data-url':@security.Roles.show(vo?.id),modal:'true',class:'fa fa-search','data-func':'showDetail','data-toggle':'modal', 'data-target':'#mainDialog',role:'button',actionCode:'990008008'  /}
                            #{f.link_to '编辑',href:@security.Roles.edit(vo?.id),class:'fa fa-edit',actionCode:'990008004' /}
                            #{f.link_to '删除',href:@security.Roles.destroy(vo?.id),class:'fa fa-trash-o',method:'DELETE',actionCode:'990008006' /}
                            
                            </td>
                        </tr>
                    #{/list}
                    #{else}
                        <tr class="empty-line"><td colspan="10">暂无记录</td></tr>
                    #{/else}
                       </tbody>
                    </table>
                  #{if rs?.pager}
                        #{f.pagination pager:rs?.pager,url:'/roles' /}
                 #{/if}
                        </div>

                    </div>
                </div>
            </div>
            </div>
        </div>
     <script type="text/javascript">
     function query(){
         $('#queryForm').submit();
     }
     
     </script>  